%{
#include <stdio.h>
int lineno = 1;
int erroroccured = 0;

%}

%option noyywrap

%%

for		return(FOR);

while		return(WHILE);

if		return(IF);
else		return(ELSE);

do		return(DO);

break		return(BREAK);
continue	return(CONTINUE);

true		return(BOOLEAN_LITERAL);
false		return(BOOLEAN_LITERAL);

return		return(RETURN);

define		return(DEFINE);

main		return(MAIN);

display		return(DISPLAY);
ones		return(ONES);
identity		return(IDENTITY);
rows		return(ROWS);
columns		return(COLUMNS);
transpose		return(TRANSPOSE);
inverse		return(INVERSE);

"+"		return(PLUS);
"-"		return(MINUS);
"*"		return(ASTERIKS);
\/		return(SOLIDUS);
%		return(PERCENT);
"&"		return(AMPERSAND);
"|"		return(VERTICAL_LINE);
=		return(EQUALS);
\!		return(EXCLAMATION);
\?		return(QUESTION);
;		return(SEMICOLON);
"~"		return(TILDA);
"<"		return(LESS);
">"		return(GREATER);
,		return(COMMA);
\^		return(UNARY_MINUS_SIGN);
"."		return(DOT);
\:		return(COLON);
"("		return(L_PARANTHESIS);
")"		return(R_PARANTHESIS);
\[		return(L_SQUAREBRACKET);
\]		return(R_SQUAREBRACKET);
"{"		return(L_CURLYBRACKET);
"}"		return(R_CURLYBRACKET);
\"		return(QUOTE);
#		return(NUMBER_SIGN);
\$		return(DOLLAR_SIGN);

\n		lineno++;
[ \t]+  ;    

[0-9][0-9]*|0x[0-9a-fA-F]+ {return(INTEGER_LITERAL);}			

[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?	return(FLOAT_LITERAL); 

\"(.*)\"	return(STRING_LITERAL);

[a-zA-Z_][a-zA-Z0-9_]*	return(IDENTIFIER);

\/\*([^*]|[\r\n])*\*\/	 return(COMMENT);


%%
